# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 76
n 76(None)[return True
]:
	i: 67(), 75()
	o: 

nname: 75
n 75(None)[]:
	i: 31&50(f)
	o: 76()

nname: 67
n 67(None)[return False
]:
	i: 31&50(t)
	o: 76()

nname: 31&50
n 31&50(context['menu'].type in ('tv_navigator',) and not isinstance(selected, Playlist))[]:
	i: 22(), 30()
	o: 67(t), 75(f)

nname: 30
n 30(None)[]:
	i: 0(f)
	o: 31&50()

nname: 22
n 22(None)[return False
]:
	i: 0(t)
	o: 31&50()

nname: 0
n 0(selected is None)[selected = context['selected']
]:
	i: 
	o: 22(t), 30(f)

nname: 76
n 76(None)[return True
]:
	i: 0()
	o: 

nname: 0
n 0(None)[selected = context['selected']
if selected is None:
	return False
if context['menu'].type in ('tv_navigator',) and not isinstance(selected, Playlist):
	return False
]:
	i: 
	o: 76()

nname: 0
n 0(None)[selected = context['selected']
if selected is None:
	return False
if context['menu'].type in ('tv_navigator',) and not isinstance(selected, Playlist):
	return False
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7691d4c>}
nname: 650
n 650(None)[return act
]:
	i: 569(JA), 645(), 649()
	o: 

nname: 649
n 649(None)[]:
	i: 504&516(f)
	o: 650()

nname: 645
n 645(None)[]:
	i: 536(f)
	o: 650()

nname: 569
n 569(None)[from pygui.actions.jobs.transcode import transcode
context['psp_path'] = psp_path
act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
]:
	i: 536(t)
	o: 650(JA)

nname: 536
n 536(psp_path)[from pygui.shared import pygui_globs
psp_path = pygui_globs['psp_path']
]:
	i: 504&516(t)
	o: 569(t), 645(f)

nname: 504&516
n 504&516('transcode' in plugins and context['selected'].type in ('video',))[]:
	i: 400(JA), 499(), 503()
	o: 536(t), 649(f)

nname: 503
n 503(None)[]:
	i: 84&104(f)
	o: 504&516()

nname: 499
n 499(None)[]:
	i: 380(f)
	o: 504&516()

nname: 400
n 400(None)[act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
]:
	i: 380(t)
	o: 504&516(JA)

nname: 380
n 380(context['selected']['backend'] != 'upnp')[]:
	i: 279(), 379()
	o: 400(t), 499(f)

nname: 379
n 379(None)[]:
	i: 267(f)
	o: 380()

nname: 279
n 279(None)[act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
return act
]:
	i: 267(t)
	o: 380()

nname: 267
n 267(menu_type in ('scheduled_navigator',))[]:
	i: 259(), 266()
	o: 279(t), 379(f)

nname: 266
n 266(None)[]:
	i: 120(f)
	o: 267()

nname: 259
n 259(None)[return act
]:
	i: 159(), 258()
	o: 267()

nname: 258
n 258(None)[]:
	i: 133(f)
	o: 259()

nname: 159
n 159(None)[act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
]:
	i: 133(t)
	o: 259()

nname: 133
n 133(isinstance(selected, Playlist))[selected = context['selected']
]:
	i: 120(t)
	o: 159(t), 258(f)

nname: 120
n 120(menu_type in ('tv_navigator',))[]:
	i: 84&104(t)
	o: 133(t), 266(f)

nname: 84&104
n 84&104(user_config['security']['parent_mode'] or not user_config['security']['parental_control'])[act = []
]:
	i: 66(), 83()
	o: 120(t), 503(f)

nname: 83
n 83(None)[]:
	i: 0(f)
	o: 84&104()

nname: 66
n 66(None)[fl.menu = context['menu']
]:
	i: 0(t)
	o: 84&104()

nname: 0
n 0(fl is not None)[menu_type = context['menu'].type
from pygui.markerlist import markerlists
fl = markerlists().get(context['menu'].universe)
]:
	i: 
	o: 66(t), 83(f)

nname: 504&516
n 504&516(None)[if 'transcode' in plugins and context['selected'].type in ('video',):
	from pygui.shared import pygui_globs
	psp_path = pygui_globs['psp_path']
	if psp_path:
		from pygui.actions.jobs.transcode import transcode
		context['psp_path'] = psp_path
		act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
return act
]:
	i: 267(JA), 0(f)
	o: 

nname: 267
n 267(None)[if menu_type in ('scheduled_navigator',):
	act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
	act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
	return act
if context['selected']['backend'] != 'upnp':
	act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
	act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
]:
	i: 133(), 120(f)
	o: 504&516(JA)

nname: 133
n 133(None)[selected = context['selected']
if isinstance(selected, Playlist):
	act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
	act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
return act
]:
	i: 120(t)
	o: 267()

nname: 120
n 120(menu_type in ('tv_navigator',))[]:
	i: 0(t)
	o: 133(t), 267(f)

nname: 0
n 0(user_config['security']['parent_mode'] or not user_config['security']['parental_control'])[menu_type = context['menu'].type
from pygui.markerlist import markerlists
fl = markerlists().get(context['menu'].universe)
if fl is not None:
	fl.menu = context['menu']
act = []
]:
	i: 
	o: 120(t), 504&516(f)

nname: 504&516
n 504&516(None)[if 'transcode' in plugins and context['selected'].type in ('video',):
	from pygui.shared import pygui_globs
	psp_path = pygui_globs['psp_path']
	if psp_path:
		from pygui.actions.jobs.transcode import transcode
		context['psp_path'] = psp_path
		act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
return act
]:
	i: 120(JA), 0(f)
	o: 

nname: 120
n 120(None)[if menu_type in ('tv_navigator',):
	selected = context['selected']
	if isinstance(selected, Playlist):
		act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
		act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
	return act
if menu_type in ('scheduled_navigator',):
	act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
	act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
	return act
if context['selected']['backend'] != 'upnp':
	act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
	act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
]:
	i: 0(t)
	o: 504&516(JA)

nname: 0
n 0(user_config['security']['parent_mode'] or not user_config['security']['parental_control'])[menu_type = context['menu'].type
from pygui.markerlist import markerlists
fl = markerlists().get(context['menu'].universe)
if fl is not None:
	fl.menu = context['menu']
act = []
]:
	i: 
	o: 120(t), 504&516(f)

nname: 0
n 0(None)[menu_type = context['menu'].type
from pygui.markerlist import markerlists
fl = markerlists().get(context['menu'].universe)
if fl is not None:
	fl.menu = context['menu']
act = []
if user_config['security']['parent_mode'] or not user_config['security']['parental_control']:
	if menu_type in ('tv_navigator',):
		selected = context['selected']
		if isinstance(selected, Playlist):
			act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
			act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
		return act
	if menu_type in ('scheduled_navigator',):
		act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
		act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
		return act
	if context['selected']['backend'] != 'upnp':
		act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
		act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
if 'transcode' in plugins and context['selected'].type in ('video',):
	from pygui.shared import pygui_globs
	psp_path = pygui_globs['psp_path']
	if psp_path:
		from pygui.actions.jobs.transcode import transcode
		context['psp_path'] = psp_path
		act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
return act
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb769a6ec>}
nname: 0
n 0(None)[from __future__ import absolute_import
name = 'Selected'
image = 'hand_selected'
category = 'navigator'
position = 4
default = True
unique = False
from pygui.actions.jobs.fs import execute_delete, execute_rename, execute_eject
from pygui.actions.jobs.marker import execute_burn_marker_list
from pygui.actions.jobs.marker import execute_copy_marked_items
from pygui.actions.jobs.records import execute_cancel_record, execute_rename_record
from pygui.config import plugins, user_config
from pygui.item.core import ActionItem
from pygui.item.mediaitem import Playlist
def is_available(context):
	selected = context['selected']
	if selected is None:
		return False
	if context['menu'].type in ('tv_navigator',) and not isinstance(selected, Playlist):
		return False
	return True

def get_action_info_list(context):
	menu_type = context['menu'].type
	from pygui.markerlist import markerlists
	fl = markerlists().get(context['menu'].universe)
	if fl is not None:
		fl.menu = context['menu']
	act = []
	if user_config['security']['parent_mode'] or not user_config['security']['parental_control']:
		if menu_type in ('tv_navigator',):
			selected = context['selected']
			if isinstance(selected, Playlist):
				act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
				act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
			return act
		if menu_type in ('scheduled_navigator',):
			act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
			act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
			return act
		if context['selected']['backend'] != 'upnp':
			act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
			act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
	if 'transcode' in plugins and context['selected'].type in ('video',):
		from pygui.shared import pygui_globs
		psp_path = pygui_globs['psp_path']
		if psp_path:
			from pygui.actions.jobs.transcode import transcode
			context['psp_path'] = psp_path
			act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
	return act

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb768a82c>}
from __future__ import absolute_import
name = 'Selected'
image = 'hand_selected'
category = 'navigator'
position = 4
default = True
unique = False
from pygui.actions.jobs.fs import execute_delete, execute_rename, execute_eject
from pygui.actions.jobs.marker import execute_burn_marker_list
from pygui.actions.jobs.marker import execute_copy_marked_items
from pygui.actions.jobs.records import execute_cancel_record, execute_rename_record
from pygui.config import plugins, user_config
from pygui.item.core import ActionItem
from pygui.item.mediaitem import Playlist
def is_available(context):
	selected = context['selected']
	if selected is None:
		return False
	if context['menu'].type in ('tv_navigator',) and not isinstance(selected, Playlist):
		return False
	return True

def get_action_info_list(context):
	menu_type = context['menu'].type
	from pygui.markerlist import markerlists
	fl = markerlists().get(context['menu'].universe)
	if fl is not None:
		fl.menu = context['menu']
	act = []
	if user_config['security']['parent_mode'] or not user_config['security']['parental_control']:
		if menu_type in ('tv_navigator',):
			selected = context['selected']
			if isinstance(selected, Playlist):
				act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
				act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
			return act
		if menu_type in ('scheduled_navigator',):
			act.append(ActionItem(_('Rename'), type_='action', action=execute_rename_record, args=[context]))
			act.append(ActionItem(_('Delete'), type_='action', action=execute_cancel_record, args=[context]))
			return act
		if context['selected']['backend'] != 'upnp':
			act.append(ActionItem(_('Rename'), type_='action', action=execute_rename, args=[context]))
			act.append(ActionItem(_('Delete'), type_='action', action=execute_delete, args=[context, fl]))
	if 'transcode' in plugins and context['selected'].type in ('video',):
		from pygui.shared import pygui_globs
		psp_path = pygui_globs['psp_path']
		if psp_path:
			from pygui.actions.jobs.transcode import transcode
			context['psp_path'] = psp_path
			act.append(ActionItem(_('Transcode to PSP\xe2\x84\xa2'), type_='action', action=transcode, args=[context]))
	return act

